// Tri 可以是 non-sealed，允许进一步扩展
public non-sealed class Tri extends Shape {
    private final double base;
    private final double height;

    public Tri(double base, double height) {
        this.base = base;
        this.height = height;
    }

    @Override
    public double area() {
        return 0.5 * base * height;
    }
}
